import request from '@/utils/request'

// 查询选择题列表
export function listChoices(query) {
  return request({
    url: '/exam/choices/list',
    method: 'get',
    params: query
  })
}

// 查询选择题详细
export function getChoices(choiceId) {
  return request({
    url: '/exam/choices/' + choiceId,
    method: 'get'
  })
}

// 新增选择题
export function addChoices(data) {
  return request({
    url: '/exam/choices',
    method: 'post',
    data: data
  })
}

// 修改选择题
export function updateChoices(data) {
  return request({
    url: '/exam/choices',
    method: 'put',
    data: data
  })
}

// 删除选择题
export function delChoices(choiceId) {
  return request({
    url: '/exam/choices/' + choiceId,
    method: 'delete'
  })
}

// 导出选择题
export function exportChoices(query) {
  return request({
    url: '/exam/choices/export',
    method: 'get',
    params: query
  })
}